package file;

import java.io.File;

public class ListFilesDemo {
    public static void main(String[] args) {
        File dir = new File("C:/");
        if(dir.isDirectory()){
            File[]subs = dir.listFiles();
            for (File sub : subs){
                System.out.println(sub.getName());
            }
        }
    }
}
